package com.frain.springcloud.hystrix.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.frain.springcloud.hystrix.service.ProviderFeignService;

/**
 * 
 * @ClassName: HystrixController 
 * @Description: 熔断测试工程
 * @author frain
 * @date 2018年8月6日 上午11:01:43 
 *
 */
@RestController
@RequestMapping("/hystrix")
public class HystrixController {

    @Autowired
    private ProviderFeignService providerFeignService;

    @RequestMapping("/time/three/finish")
    public String timeThreeFinish() {

        return providerFeignService.timeThreeFinish();
    }

    @RequestMapping("/random/exception")
    public String randomException() {
        return providerFeignService.randomException();
    }

    @RequestMapping("/demo")
    public String getDemo() {
        return providerFeignService.getDemo();
    }

}
